package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.Course;
import com.ruoyi.system.mapper.CourseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.validation.Valid;
import java.util.List;

/*
功能描述:
作者：14136
创造日期：2024/12/22
*/
@Service
public class SysCourseServiceImpl implements SysCourseService{
    @Autowired
    private  CourseMapper CourseMapper;

    @Override
    public List<Course> selectCourseList(Course course) {
        return CourseMapper.courseList();
    }

     @Override
    public Course selectcourseById(@Param("id")Integer id) {
        return CourseMapper.selectcourseList(id);
    }

    @Override
    public int updateCourse(@Valid Course course) {
        CourseMapper.updateCourse(course);
        return 1;
    }

    @Override
    public void insertCourse(Course course) {
        CourseMapper.insertCourse(course);

    }

    @Override
    public void deleteCourseByIds(Integer[] ids) {
        CourseMapper.deleteCourseByIds(ids);

    }

    @Override
    public int updateCoursePicture(Course course) {
        return  CourseMapper.updateCoursePicture(course);
    }





}
